<?php
/**
 * Desc: 基础控制器
 * Auth: Shaoming Lu<lushao1012@163.com>
 * Date: 2018/5/30
 * Time: 10:52
 */
namespace App\Http\Controllers;
use App\Http\Services\DB;
use Illuminate\Http\Request;
use App\Http\Services\MCore;
use Illuminate\Support\Facades\Redirect;
class BaseController extends Controller
{
    public $db_list;

    public function __construct()
    {
//        $this->get_db_list();
//        $db_name = MCore::get_var('db_name', $request, 0);
//        $db1 = new DB();
//        $a = $db1->connect_mysql();
//        var_dump($a);exit;
//        echo $a['error_msg'];exit;
//        // 获取所有的数据库
//        $db_list = $db->show_all_databases();
//
//        $this->db_list = $db_list;
    }

    public function get_db_list()
    {
        $a = session('db');
        var_dump($a);exit;
//        $db1 = new DB();
    }

}